<template>
  <div class="AddOrUpdate_main add_container showDetail noMargin column_two">
    <div class="main_main">
      <div ref="table_container" class="noPadding table_container draggableTable addRow_table">
        <el-table
          ref="table"
          :data="data"
          :height="tableHeight"
          stripe
          border
          style="width: 99.9%"
        >
          <el-table-column label="备件编码" prop="spareCode">
            <template slot-scope="scope">
              <span>{{ scope.row.spareCode }}</span>
            </template>
          </el-table-column>
          <el-table-column label="备件编码" prop="spareName">
            <template slot-scope="scope">
              <span>{{ scope.row.spareName }}</span>
            </template>
          </el-table-column>
          <el-table-column label="单价" prop="price">
            <template slot-scope="scope">
              <span>{{ scope.row.price }}</span>
            </template>
          </el-table-column>
          <el-table-column label="使用数量" prop="useNumber">
            <template slot-scope="scope">
              <span>{{ scope.row.useNumber }}</span>
            </template>
          </el-table-column>
          <el-table-column label="金额（元）" prop="allPrice">
            <template slot-scope="scope">
              <span>{{ scope.row.allPrice }}</span>
            </template>
          </el-table-column>

        </el-table>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'ShowDetailOld',
  props: {
    layerid: {},
    id: {},
    data: {}
  },
  data() {
    return {
      formData: {
      },
      rules: {
      },
      tableHeight: '350',
      taxRateCodeList: [],
      peopleList: [],
      listData: [],
      adjustmentList: [],
      rowId: null,
      tipDisabled: false
    }
  },
  mounted() {
    this.$nextTick(() => {
      this.tableHeight = this.$refs.table_container.offsetHeight
    })
  },
  created() {

  },
  methods: {
    getClass(item) {
      let res = ''
      if (item.type == 'form') {
        res += 'showItem'
        if (item.length && item.length == 'double') {
          res += ' doubles'
        }
      } else if (item.type == 'file') {
        res += 'showItem doubles'
      } else {
        res += 'showTable'
      }

      return res
    }
  }
}
</script>

<style lang="less" scoped>
.main_main{
  margin-top: 20px;
  padding: 0 !important;
  .el-form{
    height: 100%;
    align-content: flex-start;

    .showItem{
      margin-left: 20px;
      margin-right: 20px;
      width: calc(33.33% - 40px);
    }

    /deep/ .el-form-item{
      width: 100%;
      border-bottom: 1px solid rgba(105,105,105,0.2);
      margin-left: 0;
      margin-right: 0;

      .el-form-item__label:before{
        content: none;
      }

      .el-form-item__label{
        color: #1F51B3;
        font-size: 15px;
      }
      .el-form-item__content{
        word-break: break-all;
        color: #333333;
        font-size: 15px;
        flex: 1;
        width: unset;
        margin-right: 0px;
      }
    }
    .doubles{
      width: calc(100% - 40px);
      //.show{
      //  overflow: hidden;
      //  text-overflow: ellipsis;
      //  display: -webkit-box;
      //  -webkit-line-clamp: 2;
      //  -webkit-box-orient: vertical;
      //}
    }
  }
  .showTable{
    width: 100%;
  }
}

.column_one{
  .showItem{
    width: 100% !important;
  }
}
.noData{
  color: #c0c4cc;
}
.shows{
  height: fit-content !important;
  padding-top: 10px;
  padding-bottom: 10px;
}

.show{
  height: fit-content !important;
  min-height: 50px;
  padding-top: 10px;
  padding-bottom: 10px;
}
.FileManageFull_container{
  padding-top: 10px;
}

.table_container{
  /deep/ .el-form-item{
    border-bottom: 0 !important;
    width: calc(100% - 40px) !important;
    margin-left: 20px !important;
    margin-right: 20px !important;
    .el-form-item__label:before{
      content: none;
    }
    .el-form-item__content{
      word-break: break-all;
      flex: 1;
      width: unset;
      margin-right: 0px;
    }
  }
}
.record{
    max-height: 180px;
    overflow: auto;
    .all{
        border-left: 1px solid silver;
        padding-left: 10px;
        .oneRecord{
            margin: 10px 0;
            width: 650px;
            text-overflow: ellipsis;
            overflow: hidden;
            white-space: nowrap;
        }
    }
}

.noPadding{
    padding-top: 0 !important;
}
.formItem_header{
    margin-top: 10px;
}
.el-table {
  font-size: 15px;
}
</style>
